<script setup>
import {
  onLoad,
  onShow,
  onReady,
  onHide,
  onUnload,
  onPullDownRefresh,
} from "@dcloudio/uni-app"; // Composition Api写法：@dcloudio/uni-app 包内导入 uni-app 应用生命周期及页面的生命周期，不可以导出组件生命周期
import Info from "./components/info.vue";

onLoad(() => {
  console.log("监听页面加载");
});
onShow(() => {
  console.log("监听页面显示");
});
onReady(() => {
  console.log("监听页面初次渲染完成");
});
onHide(() => {
  console.log("监听页面隐藏");
});
onUnload(() => {
  console.log("监听页面卸载");
});

onPullDownRefresh(() => {
  console.log("监听用户下拉动作");
});

// 获取当前页面栈
const pages = getCurrentPages();
console.log(pages[0].__route__, "pages");
// 获取全局变量
const app = getApp();
console.log(app, "app");
</script>

<template>
  <view class="">
    我的
    <Info />
  </view>
</template>

<style lang="scss" scoped>
//
</style>
